package client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author HGD
 * @date 2022/10/5 12:33
 */
@FeignClient("user")
public interface UserClient {
    /**
     * 通过用户id获取部门id
     *
     * @param id 用户id
     * @return 部门id
     */
    @PostMapping("/user/getDepartmentIddById")
    Long getDepartmentIddById(@RequestBody Long id);

    /**
     * 通过部门id获取对应的成员id列表
     *
     * @param departmentId 部门id
     * @return 成员id列表
     */
    @PostMapping("/user/getIdsByDepartmentId")
    List<Long> getIdsByDepartmentId(@RequestBody Long departmentId);
}
